package com.weixing.mall.provider.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.provider.model.domain.Role;
import com.weixing.mall.provider.model.query.SysRoleQuery;
import com.weixing.mall.provider.model.vo.sys.SysRoleEditVo;
import com.weixing.mall.provider.model.vo.sys.SysRoleFormVo;
import com.weixing.mall.provider.model.vo.sys.SysRoleVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author Small
 * @since 2019-11-18
 */
public interface RoleMapper extends BaseMapper<Role> {

    IPage<SysRoleVo> selectOfPage(@Param("pg") Page page, @Param("qs") SysRoleQuery sysRoleQuery);

    SysRoleEditVo selectSysRoleVoById(long id);

    List<SysRoleFormVo> selectSysRoleFormVoList(Integer sysFlag);

    List<Role> selectSysRoleByUserId(@Param("userId") long userId, @Param("sysFlag") Integer sysFlag);

    List<SysRoleVo> selectSysAll();
}
